home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / gberet.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  28KB  |  792 lines

  1. /***************************************************************************
  2.  
  3. Green Beret memory map (preliminary)
  4.  
  5. gberetb is a bootleg hacked to run on different hardware.
  6.  
  7. driver by Nicola Salmoria
  8.  
  9.  
  10. 0000-bfff ROM
  11. c000-c7ff Color RAM
  12. c800-cfff Video RAM
  13. d000-d0c0 Sprites (bank 0)
  14. d100-d1c0 Sprites (bank 1)
  15. d200-dfff RAM
  16. e000-e01f ZRAM1 line scroll registers
  17. e020-e03f ZRAM2 bit 8 of line scroll registers
  18.  
  19. read:
  20. f200      DSW1
  21.           bit 0-1 lives
  22.           bit 2   cocktail/upright cabinet (0 = upright)
  23.           bit 3-4 bonus
  24.           bit 5-6 difficulty
  25.           bit 7   demo sounds
  26. f400      DSW2
  27.           bit 0 = screen flip
  28.           bit 1 = single/dual upright controls
  29. f600      DSW0
  30.           bit 0-1-2-3 coins per play Coin1
  31.           bit 4-5-6-7 coins per play Coin2
  32. f601      IN1 player 2 controls
  33. f602      IN0 player 1 controls
  34. f603      IN2
  35.           bit 0-1-2 coin  bit 3 1 player start  bit 4 2 players start
  36.  
  37. write:
  38. e040      ?
  39. e041      ?
  40. e042      ?
  41. e043      bit 3 = sprite RAM bank select; other bits = ?
  42. e044      bit 0 = nmi enable, bit 3 = flip screen, other bits = ?
  43. f000      ?
  44. f200      SN76496 command
  45. f400      SN76496 trigger (write command to f200, then write to this location
  46.           to cause the chip to read it)
  47. f600      watchdog reset (?)
  48.  
  49. interrupts:
  50. The game uses both IRQ (mode 1) and NMI.
  51.  
  52.  
  53. TODO:
  54. gberetb:
  55. - cocktail mode
  56. mrgoemon:
  57. - flickering rogue sprites
  58. - it resets during the first boot sequence, but works afterwards
  59.  
  60. ***************************************************************************/
  61.  
  62. #include "driver.h"
  63. #include "vidhrdw/generic.h"
  64.  
  65.  
  66.  
  67. extern unsigned char *gberet_videoram,*gberet_colorram;
  68. extern unsigned char *gberet_spritebank;
  69. extern unsigned char *gberet_scrollram;
  70. WRITE_HANDLER( gberet_videoram_w );
  71. WRITE_HANDLER( gberet_colorram_w );
  72. WRITE_HANDLER( gberet_e044_w );
  73. WRITE_HANDLER( gberet_scroll_w );
  74. WRITE_HANDLER( gberetb_scroll_w );
  75. void gberet_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  76. int gberet_vh_start(void);
  77. void init_gberet(void);
  78. void init_gberetb(void);
  79. void gberet_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  80.  
  81. int gberet_interrupt(void);
  82.  
  83.  
  84. static WRITE_HANDLER( gberet_coincounter_w )
  85. {
  86.     /* bits 0/1 = coin counters */
  87.     coin_counter_w(0,data & 1);
  88.     coin_counter_w(1,data & 2);
  89. }
  90.  
  91. static WRITE_HANDLER( mrgoemon_bankswitch_w )
  92. {
  93.     unsigned char *RAM = memory_region(REGION_CPU1);
  94.     int offs;
  95.  
  96.     /* bits 0/1 = coin counters */
  97.     coin_counter_w(0,data & 1);
  98.     coin_counter_w(1,data & 2);
  99.  
  100.     /* bits 5-7 = ROM bank select */
  101.     offs = 0x10000 + ((data & 0xe0) >> 5) * 0x800;
  102.     cpu_setbank(1,&RAM[offs]);
  103. }
  104.  
  105.  
  106.  
  107. static struct MemoryReadAddress readmem[] =
  108. {
  109.     { 0x0000, 0xbfff, MRA_ROM },
  110.     { 0xc000, 0xe03f, MRA_RAM },
  111.     { 0xf200, 0xf200, input_port_4_r },    /* DSW1 */
  112.     { 0xf400, 0xf400, input_port_5_r },    /* DSW2 */
  113.     { 0xf600, 0xf600, input_port_3_r },    /* DSW0 */
  114.     { 0xf601, 0xf601, input_port_1_r },    /* IN1 */
  115.     { 0xf602, 0xf602, input_port_0_r },    /* IN0 */
  116.     { 0xf603, 0xf603, input_port_2_r },    /* IN2 */
  117.     { 0xf800, 0xf800, MRA_NOP },    /* gberetb only - IRQ acknowledge */
  118.     { -1 }    /* end of table */
  119. };
  120.  
  121. static struct MemoryWriteAddress writemem[] =
  122. {
  123.     { 0x0000, 0xbfff, MWA_ROM },
  124.     { 0xc000, 0xc7ff, gberet_colorram_w, &gberet_colorram },
  125.     { 0xc800, 0xcfff, gberet_videoram_w, &gberet_videoram },
  126.     { 0xd000, 0xd0bf, MWA_RAM, &spriteram_2 },
  127.     { 0xd100, 0xd1bf, MWA_RAM, &spriteram, &spriteram_size },
  128.     { 0xd200, 0xdfff, MWA_RAM },
  129.     { 0xe000, 0xe03f, gberet_scroll_w, &gberet_scrollram },
  130.     { 0xe043, 0xe043, MWA_RAM, &gberet_spritebank },
  131.     { 0xe044, 0xe044, gberet_e044_w },
  132.     { 0xf000, 0xf000, gberet_coincounter_w },
  133.     { 0xf200, 0xf200, MWA_NOP },        /* Loads the snd command into the snd latch */
  134.     { 0xf400, 0xf400, SN76496_0_w },    /* This address triggers the SN chip to read the data port. */
  135. //    { 0xf600, 0xf600, MWA_NOP },
  136.     { -1 }    /* end of table */
  137. };
  138.  
  139. static struct MemoryWriteAddress gberetb_writemem[] =
  140. {
  141.     { 0x0000, 0xbfff, MWA_ROM },
  142.     { 0xc000, 0xc7ff, gberet_colorram_w, &gberet_colorram },
  143.     { 0xc800, 0xcfff, gberet_videoram_w, &gberet_videoram },
  144.     { 0xd000, 0xd0ff, MWA_RAM },
  145.     { 0xd100, 0xd1ff, MWA_RAM },
  146.     { 0xd200, 0xdfff, MWA_RAM },
  147.     { 0xe000, 0xe03f, MWA_RAM },
  148. //    { 0xe800, 0xe8ff, MWA_RAM },
  149.     { 0xe900, 0xe9ff, MWA_RAM, &spriteram, &spriteram_size },
  150.     { 0xf800, 0xf800, MWA_NOP },    /* NMI acknowledge */
  151.     { 0xf900, 0xf901, gberetb_scroll_w },
  152. //    { 0xe043, 0xe043, MWA_RAM, &gberet_spritebank },
  153.     { 0xe044, 0xe044, gberet_e044_w },
  154.     { 0xf400, 0xf400, SN76496_0_w },
  155.     { -1 }    /* end of table */
  156. };
  157.  
  158. static struct MemoryReadAddress mrgoemon_readmem[] =
  159. {
  160.     { 0x0000, 0xbfff, MRA_ROM },
  161.     { 0xc000, 0xe03f, MRA_RAM },
  162.     { 0xf200, 0xf200, input_port_4_r },    /* DSW1 */
  163.     { 0xf400, 0xf400, input_port_5_r },    /* DSW2 */
  164.     { 0xf600, 0xf600, input_port_3_r },    /* DSW0 */
  165.     { 0xf601, 0xf601, input_port_1_r },    /* IN1 */
  166.     { 0xf602, 0xf602, input_port_0_r },    /* IN0 */
  167.     { 0xf603, 0xf603, input_port_2_r },    /* IN2 */
  168.     { 0xf800, 0xffff, MRA_BANK1 },
  169.     { -1 }    /* end of table */
  170. };
  171.  
  172. static struct MemoryWriteAddress mrgoemon_writemem[] =
  173. {
  174.     { 0x0000, 0xbfff, MWA_ROM },
  175.     { 0xc000, 0xc7ff, gberet_colorram_w, &gberet_colorram },
  176.     { 0xc800, 0xcfff, gberet_videoram_w, &gberet_videoram },
  177.     { 0xd000, 0xd0bf, MWA_RAM, &spriteram_2 },
  178.     { 0xd100, 0xd1bf, MWA_RAM, &spriteram, &spriteram_size },
  179.     { 0xd200, 0xdfff, MWA_RAM },
  180.     { 0xe000, 0xe03f, gberet_scroll_w, &gberet_scrollram },
  181.     { 0xe043, 0xe043, MWA_RAM, &gberet_spritebank },
  182.     { 0xe044, 0xe044, gberet_e044_w },
  183.     { 0xf000, 0xf000, mrgoemon_bankswitch_w },    /* + coin counters */
  184.     { 0xf200, 0xf200, MWA_NOP },        /* Loads the snd command into the snd latch */
  185.     { 0xf400, 0xf400, SN76496_0_w },    /* This address triggers the SN chip to read the data port. */
  186.     { 0xf800, 0xffff, MWA_ROM },
  187.     { -1 }    /* end of table */
  188. };
  189.  
  190.  
  191.  
  192. INPUT_PORTS_START( gberet )
  193.     PORT_START    /* IN0 */
  194.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  195.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  196.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  197.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  198.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  199.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  200.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  201.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  202.  
  203.     PORT_START    /* IN1 */
  204.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  205.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  206.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  207.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  208.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  209.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  210.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  211.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  212.  
  213.     PORT_START    /* IN2 */
  214.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  215.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  216.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  217.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  218.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  219.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  220.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  221.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  222.  
  223.     PORT_START    /* DSW0 */
  224.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  225.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  226.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  227.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  228.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  229.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  230.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  231.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  232.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  233.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  234.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  235.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  236.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  237.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  238.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  239.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  240.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  241.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  242.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  243.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  244.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  245.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  246.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  247.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  248.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  249.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  250.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  251.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  252.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  253.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  254.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  255.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  256.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  257.     /* 0x00 is invalid */
  258.  
  259.     PORT_START    /* DSW1 */
  260.     PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
  261.     PORT_DIPSETTING(    0x03, "2" )
  262.     PORT_DIPSETTING(    0x02, "3" )
  263.     PORT_DIPSETTING(    0x01, "5" )
  264.     PORT_DIPSETTING(    0x00, "7" )
  265.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  266.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  267.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  268.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  269.     PORT_DIPSETTING(    0x18, "30000 70000" )
  270.     PORT_DIPSETTING(    0x10, "40000 80000" )
  271.     PORT_DIPSETTING(    0x08, "50000 100000" )
  272.     PORT_DIPSETTING(    0x00, "50000 200000" )
  273.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  274.     PORT_DIPSETTING(    0x60, "Easy" )
  275.     PORT_DIPSETTING(    0x40, "Medium" )
  276.     PORT_DIPSETTING(    0x20, "Hard" )
  277.     PORT_DIPSETTING(    0x00, "Hardest" )
  278.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  279.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  280.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  281.  
  282.     PORT_START    /* DSW2 */
  283.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  284.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  285.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  286.     PORT_DIPNAME( 0x02, 0x02, "Controls" )
  287.     PORT_DIPSETTING(    0x02, "Single" )
  288.     PORT_DIPSETTING(    0x00, "Dual" )
  289.     PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Unknown ) )
  290.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  291.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  292.     PORT_DIPNAME( 0x08, 0x08, DEF_STR ( Unknown ) )
  293.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  294.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  295.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  296. INPUT_PORTS_END
  297.  
  298. /* IN2 is different and IN1 and DSW0 are swapped */
  299. INPUT_PORTS_START( gberetb )
  300.     PORT_START    /* IN0 */
  301.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  302.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  303.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  304.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  305.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  306.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  307.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  308.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  309.  
  310.     PORT_START    /* DSW0 */
  311.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  312.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  313.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  314.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  315.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  316.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  317.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  318.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  319.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  320.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  321.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  322.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  323.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  324.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  325.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  326.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  327.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  328.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  329.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  330.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  331.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  332.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  333.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  334.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  335.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  336.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  337.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  338.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  339.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  340.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  341.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  342.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  343.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  344.     /* 0x00 is invalid */
  345.  
  346.     PORT_START    /* IN2 */
  347.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
  348.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
  349.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  350.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  351.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  352.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
  353.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
  354.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
  355.  
  356.     PORT_START    /* IN1 */
  357.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  358.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  359.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  360.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  361.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  362.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  363.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  364.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  365.  
  366.     PORT_START    /* DSW1 */
  367.     PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
  368.     PORT_DIPSETTING(    0x03, "2" )
  369.     PORT_DIPSETTING(    0x02, "3" )
  370.     PORT_DIPSETTING(    0x01, "5" )
  371.     PORT_DIPSETTING(    0x00, "7" )
  372.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  373.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  374.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  375.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  376.     PORT_DIPSETTING(    0x18, "30000 70000" )
  377.     PORT_DIPSETTING(    0x10, "40000 80000" )
  378.     PORT_DIPSETTING(    0x08, "50000 100000" )
  379.     PORT_DIPSETTING(    0x00, "50000 200000" )
  380.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  381.     PORT_DIPSETTING(    0x60, "Easy" )
  382.     PORT_DIPSETTING(    0x40, "Medium" )
  383.     PORT_DIPSETTING(    0x20, "Hard" )
  384.     PORT_DIPSETTING(    0x00, "Hardest" )
  385.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  386.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  387.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  388.  
  389.     PORT_START    /* DSW2 */
  390.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  391.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  392.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  393.     PORT_DIPNAME( 0x02, 0x02, "Controls" )
  394.     PORT_DIPSETTING(    0x02, "Single" )
  395.     PORT_DIPSETTING(    0x00, "Dual" )
  396.     PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Unknown ) )
  397.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  398.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  399.     PORT_DIPNAME( 0x08, 0x08, DEF_STR ( Unknown ) )
  400.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  401.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  402.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  403. INPUT_PORTS_END
  404.  
  405. INPUT_PORTS_START( mrgoemon )
  406.     PORT_START    /* IN0 */
  407.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY )
  408.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY )
  409.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY )
  410.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY )
  411.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  412.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  413.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  414.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  415.  
  416.     PORT_START    /* IN1 */
  417.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_4WAY | IPF_COCKTAIL )
  418.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_4WAY | IPF_COCKTAIL )
  419.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_4WAY | IPF_COCKTAIL )
  420.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_4WAY | IPF_COCKTAIL )
  421.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  422.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  423.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  424.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  425.  
  426.     PORT_START    /* IN2 */
  427.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  428.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  429.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  430.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  431.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  432.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  433.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  434.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  435.  
  436.     PORT_START    /* DSW0 */
  437.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  438.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  439.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  440.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  441.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  442.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  443.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  444.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  445.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  446.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  447.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  448.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  449.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  450.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  451.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  452.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  453.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  454.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  455.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  456.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  457.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  458.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  459.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  460.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  461.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  462.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  463.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  464.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  465.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  466.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  467.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  468.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  469.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  470.     /* 0x00 is invalid */
  471.  
  472.     PORT_START    /* DSW1 */
  473.     PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
  474.     PORT_DIPSETTING(    0x03, "2" )
  475.     PORT_DIPSETTING(    0x02, "3" )
  476.     PORT_DIPSETTING(    0x01, "5" )
  477.     PORT_DIPSETTING(    0x00, "7" )
  478.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  479.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  480.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  481.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  482.     PORT_DIPSETTING(    0x18, "20000 and every 60000" )
  483.     PORT_DIPSETTING(    0x10, "30000 and every 70000" )
  484.     PORT_DIPSETTING(    0x08, "40000 and every 80000" )
  485.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  486.     PORT_DIPNAME( 0x60, 0x60, DEF_STR( Difficulty ) )
  487.     PORT_DIPSETTING(    0x60, "Easy" )
  488.     PORT_DIPSETTING(    0x40, "Medium" )
  489.     PORT_DIPSETTING(    0x20, "Hard" )
  490.     PORT_DIPSETTING(    0x00, "Hardest" )
  491.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  492.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  493.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  494.  
  495.     PORT_START    /* DSW2 */
  496.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  497.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  498.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  499.     PORT_DIPNAME( 0x02, 0x02, "Controls" )
  500.     PORT_DIPSETTING(    0x02, "Single" )
  501.     PORT_DIPSETTING(    0x00, "Dual" )
  502.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  503.     PORT_DIPNAME( 0x08, 0x08, DEF_STR ( Unknown ) )
  504.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  505.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  506.     PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
  507. INPUT_PORTS_END
  508.  
  509.  
  510.  
  511. static struct GfxLayout charlayout =
  512. {
  513.     8,8,    /* 8*8 characters */
  514.     512,    /* 512 characters */
  515.     4,    /* 4 bits per pixel */
  516.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  517.     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
  518.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  519.     32*8    /* every char takes 8 consecutive bytes */
  520. };
  521.  
  522. static struct GfxLayout spritelayout =
  523. {
  524.     16,16,    /* 16*16 sprites */
  525.     512,    /* 512 sprites */
  526.     4,    /* 4 bits per pixel */
  527.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  528.     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
  529.         32*8+0*4, 32*8+1*4, 32*8+2*4, 32*8+3*4, 32*8+4*4, 32*8+5*4, 32*8+6*4, 32*8+7*4 },
  530.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
  531.         64*8+0*32, 64*8+1*32, 64*8+2*32, 64*8+3*32, 64*8+4*32, 64*8+5*32, 64*8+6*32, 64*8+7*32 },
  532.     128*8    /* every sprite takes 128 consecutive bytes */
  533. };
  534.  
  535. static struct GfxLayout gberetb_charlayout =
  536. {
  537.     8,8,    /* 8*8 characters */
  538.     512,    /* 512 characters */
  539.     4,    /* 4 bits per pixel */
  540.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  541.     { 6*4, 7*4, 0*4, 1*4, 2*4, 3*4, 4*4, 5*4 },
  542.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  543.     32*8    /* every char takes 8 consecutive bytes */
  544. };
  545.  
  546. static struct GfxLayout gberetb_spritelayout =
  547. {
  548.     16,16,    /* 16*16 sprites */
  549.     512,    /* 512 sprites */
  550.     4,    /* 4 bits per pixel */
  551.     { 0*0x4000*8, 1*0x4000*8, 2*0x4000*8, 3*0x4000*8 },
  552.     { 0, 1, 2, 3, 4, 5, 6, 7,
  553.         16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7 },
  554.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  555.         8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
  556.     32*8    /* every sprite takes 32 consecutive bytes */
  557. };
  558.  
  559.  
  560. static struct GfxDecodeInfo gfxdecodeinfo[] =
  561. {
  562.     { REGION_GFX1, 0, &charlayout,       0, 16 },
  563.     { REGION_GFX2, 0, &spritelayout, 16*16, 16 },
  564.     { -1 } /* end of array */
  565. };
  566.  
  567. static struct GfxDecodeInfo gberetb_gfxdecodeinfo[] =
  568. {
  569.     { REGION_GFX1, 0, &gberetb_charlayout,       0, 16 },
  570.     { REGION_GFX2, 0, &gberetb_spritelayout, 16*16, 16 },
  571.     { -1 } /* end of array */
  572. };
  573.  
  574.  
  575.  
  576. static struct SN76496interface sn76496_interface =
  577. {
  578.     1,    /* 1 chip */
  579.     { 18432000/12 },    /* 2H (generated by a custom IC) */
  580.     { 100 }
  581. };
  582.  
  583.  
  584.  
  585. static struct MachineDriver machine_driver_gberet =
  586. {
  587.     /* basic machine hardware */
  588.     {
  589.         {
  590.             CPU_Z80,
  591.             18432000/6,    /* X1S (generated by a custom IC) */
  592.             readmem,writemem,0,0,
  593.             gberet_interrupt,32    /* 1 IRQ + 16 NMI (generated by a custom IC) */
  594.         }
  595.     },
  596.     30, DEFAULT_30HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  597.     1,    /* single CPU, no need for interleaving */
  598.     0,
  599.  
  600.     /* video hardware */
  601.     32*8, 32*8, { 1*8, 31*8-1, 2*8, 30*8-1 },
  602.     gfxdecodeinfo,
  603.     32,2*16*16,
  604.     gberet_vh_convert_color_prom,
  605.  
  606.     VIDEO_TYPE_RASTER,
  607.     0,
  608.     gberet_vh_start,
  609.     0,
  610.     gberet_vh_screenrefresh,
  611.  
  612.     /* sound hardware */
  613.     0,0,0,0,
  614.     {
  615.         {
  616.             SOUND_SN76496,
  617.             &sn76496_interface
  618.         }
  619.     }
  620. };
  621.  
  622. static struct MachineDriver machine_driver_gberetb =
  623. {
  624.     /* basic machine hardware */
  625.     {
  626.         {
  627.             CPU_Z80,
  628.             3072000,    /* 3.072 MHz ?? */
  629.             readmem,gberetb_writemem,0,0,
  630.             gberet_interrupt,16    /* 1 IRQ + 8 NMI */
  631.         }
  632.     },
  633.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  634.     1,    /* single CPU, no need for interleaving */
  635.     0,
  636.  
  637.     /* video hardware */
  638.     32*8, 32*8, { 1*8, 31*8-1, 2*8, 30*8-1 },
  639.     gberetb_gfxdecodeinfo,
  640.     32,2*16*16,
  641.     gberet_vh_convert_color_prom,
  642.  
  643.     VIDEO_TYPE_RASTER,
  644.     0,
  645.     gberet_vh_start,
  646.     0,
  647.     gberet_vh_screenrefresh,
  648.  
  649.     /* sound hardware */
  650.     0,0,0,0,
  651.     {
  652.         {
  653.             SOUND_SN76496,
  654.             &sn76496_interface
  655.         }
  656.     }
  657. };
  658.  
  659. static struct MachineDriver machine_driver_mrgoemon =
  660. {
  661.     /* basic machine hardware */
  662.     {
  663.         {
  664.             CPU_Z80,
  665.             18432000/6,    /* X1S (generated by a custom IC) */
  666.             mrgoemon_readmem,mrgoemon_writemem,0,0,
  667.             gberet_interrupt,16    /* 1 IRQ + 8 NMI */
  668.         }
  669.     },
  670.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  671.     1,    /* single CPU, no need for interleaving */
  672.     0,
  673.  
  674.     /* video hardware */
  675.     32*8, 32*8, { 1*8, 31*8-1, 2*8, 30*8-1 },
  676.     gfxdecodeinfo,
  677.     32,2*16*16,
  678.     gberet_vh_convert_color_prom,
  679.  
  680.     VIDEO_TYPE_RASTER,
  681.     0,
  682.     gberet_vh_start,
  683.     0,
  684.     gberet_vh_screenrefresh,
  685.  
  686.     /* sound hardware */
  687.     0,0,0,0,
  688.     {
  689.         {
  690.             SOUND_SN76496,
  691.             &sn76496_interface
  692.         }
  693.     }
  694. };
  695.  
  696.  
  697.  
  698. /***************************************************************************
  699.  
  700.   Game driver(s)
  701.  
  702. ***************************************************************************/
  703.  
  704. ROM_START( gberet )
  705.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  706.     ROM_LOAD( "c10_l03.bin",  0x0000, 0x4000, 0xae29e4ff )
  707.     ROM_LOAD( "c08_l02.bin",  0x4000, 0x4000, 0x240836a5 )
  708.     ROM_LOAD( "c07_l01.bin",  0x8000, 0x4000, 0x41fa3e1f )
  709.  
  710.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  711.     ROM_LOAD( "f03_l07.bin",  0x00000, 0x4000, 0x4da7bd1b )
  712.  
  713.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  714.     ROM_LOAD( "e05_l06.bin",  0x00000, 0x4000, 0x0f1cb0ca )
  715.     ROM_LOAD( "e04_l05.bin",  0x04000, 0x4000, 0x523a8b66 )
  716.     ROM_LOAD( "f04_l08.bin",  0x08000, 0x4000, 0x883933a4 )
  717.     ROM_LOAD( "e03_l04.bin",  0x0c000, 0x4000, 0xccecda4c )
  718.  
  719.     ROM_REGION( 0x0220, REGION_PROMS )
  720.     ROM_LOAD( "577h09",       0x0000, 0x0020, 0xc15e7c80 ) /* palette */
  721.     ROM_LOAD( "577h10",       0x0020, 0x0100, 0xe9de1e53 ) /* sprites */
  722.     ROM_LOAD( "577h11",       0x0120, 0x0100, 0x2a1a992b ) /* characters */
  723. ROM_END
  724.  
  725. ROM_START( rushatck )
  726.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  727.     ROM_LOAD( "rush_h03.10c", 0x0000, 0x4000, 0x4d276b52 )
  728.     ROM_LOAD( "rush_h02.8c",  0x4000, 0x4000, 0xb5802806 )
  729.     ROM_LOAD( "rush_h01.7c",  0x8000, 0x4000, 0xda7c8f3d )
  730.  
  731.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  732.     ROM_LOAD( "rush_h07.3f",  0x00000, 0x4000, 0x03f9815f )
  733.  
  734.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  735.     ROM_LOAD( "e05_l06.bin",  0x00000, 0x4000, 0x0f1cb0ca )
  736.     ROM_LOAD( "rush_h05.4e",  0x04000, 0x4000, 0x9d028e8f )
  737.     ROM_LOAD( "f04_l08.bin",  0x08000, 0x4000, 0x883933a4 )
  738.     ROM_LOAD( "e03_l04.bin",  0x0c000, 0x4000, 0xccecda4c )
  739.  
  740.     ROM_REGION( 0x0220, REGION_PROMS )
  741.     ROM_LOAD( "577h09",       0x0000, 0x0020, 0xc15e7c80 ) /* palette */
  742.     ROM_LOAD( "577h10",       0x0020, 0x0100, 0xe9de1e53 ) /* sprites */
  743.     ROM_LOAD( "577h11",       0x0120, 0x0100, 0x2a1a992b ) /* characters */
  744. ROM_END
  745.  
  746. ROM_START( gberetb )
  747.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  748.     ROM_LOAD( "2-ic82.10g",   0x0000, 0x8000, 0x6d6fb494 )
  749.     ROM_LOAD( "3-ic81.10f",   0x8000, 0x4000, 0xf1520a0a )
  750.  
  751.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  752.     ROM_LOAD( "1-ic92.12c",   0x00000, 0x4000, 0xb0189c87 )
  753.  
  754.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  755.     ROM_LOAD( "7-1c8.2b",     0x00000, 0x4000, 0x86334522 )
  756.     ROM_LOAD( "6-ic9.2c",     0x04000, 0x4000, 0xbda50d3e )
  757.     ROM_LOAD( "5-ic10.2d",    0x08000, 0x4000, 0x6a7b3881 )
  758.     ROM_LOAD( "4-ic11.2e",    0x0c000, 0x4000, 0x3fb186c9 )
  759.  
  760.     ROM_REGION( 0x0220, REGION_PROMS )
  761.     ROM_LOAD( "577h09",       0x0000, 0x0020, 0xc15e7c80 ) /* palette */
  762.     ROM_LOAD( "577h10",       0x0020, 0x0100, 0xe9de1e53 ) /* sprites */
  763.     ROM_LOAD( "577h11",       0x0120, 0x0100, 0x2a1a992b ) /* characters */
  764. ROM_END
  765.  
  766. ROM_START( mrgoemon )
  767.     ROM_REGION( 0x14000, REGION_CPU1 )    /* 64k for code + banked ROM */
  768.     ROM_LOAD( "621d01.10c",   0x00000, 0x8000, 0xb2219c56 )
  769.     ROM_LOAD( "621d02.12c",   0x08000, 0x4000, 0xc3337a97 )
  770.     ROM_CONTINUE(             0x10000, 0x4000 )
  771.  
  772.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  773.     ROM_LOAD( "621a05.6d",   0x00000, 0x4000, 0xf0a6dfc5 )
  774.  
  775.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  776.     ROM_LOAD( "621d03.4d",   0x00000, 0x8000, 0x66f2b973 )
  777.     ROM_LOAD( "621d04.5d",   0x08000, 0x8000, 0x47df6301 )
  778.  
  779.     ROM_REGION( 0x0220, REGION_PROMS )
  780.     ROM_LOAD( "621a06.5f",    0x0000, 0x0020, 0x7c90de5f ) /* palette */
  781.     ROM_LOAD( "621a07.6f",    0x0020, 0x0100, 0x3980acdc ) /* sprites */
  782.     ROM_LOAD( "621a08.7f",    0x0120, 0x0100, 0x2fb244dd ) /* characters */
  783. ROM_END
  784.  
  785.  
  786.  
  787. GAME( 1985, gberet,   0,      gberet,   gberet,   gberet,  ROT0, "Konami", "Green Beret" )
  788. GAME( 1985, rushatck, gberet, gberet,   gberet,   gberet,  ROT0, "Konami", "Rush'n Attack" )
  789. GAME( 1985, gberetb,  gberet, gberetb,  gberetb,  gberetb, ROT0, "bootleg", "Green Beret (bootleg)" )
  790. GAME( 1986, mrgoemon, 0,      mrgoemon, mrgoemon, gberet,  ROT0, "Konami", "Mr. Goemon (Japan)" )
  791.  
  792.